package com.commons.utils;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * json转换 工具类
 * jackson
 * @author mis_wu
 * @date 2021/11/30 16:04
 */
public class JsonUtil {
    public static String jsonUtil(Object object){
        try {
            return new ObjectMapper().writeValueAsString(object);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return null;
    }
}
